package org.hxyjs.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class PraiseChefExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public PraiseChefExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Time> timeList = new ArrayList<java.sql.Time>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                timeList.add(new java.sql.Time(iter.next().getTime()));
            }
            addCriterion(condition, timeList, property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value1.getTime()), new java.sql.Time(value2.getTime()), property);
        }

        public Criteria andUcnoIsNull() {
            addCriterion("ucno is null");
            return (Criteria) this;
        }

        public Criteria andUcnoIsNotNull() {
            addCriterion("ucno is not null");
            return (Criteria) this;
        }

        public Criteria andUcnoEqualTo(String value) {
            addCriterion("ucno =", value, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoNotEqualTo(String value) {
            addCriterion("ucno <>", value, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoGreaterThan(String value) {
            addCriterion("ucno >", value, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoGreaterThanOrEqualTo(String value) {
            addCriterion("ucno >=", value, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoLessThan(String value) {
            addCriterion("ucno <", value, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoLessThanOrEqualTo(String value) {
            addCriterion("ucno <=", value, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoLike(String value) {
            addCriterion("ucno like", value, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoNotLike(String value) {
            addCriterion("ucno not like", value, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoIn(List<String> values) {
            addCriterion("ucno in", values, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoNotIn(List<String> values) {
            addCriterion("ucno not in", values, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoBetween(String value1, String value2) {
            addCriterion("ucno between", value1, value2, "ucno");
            return (Criteria) this;
        }

        public Criteria andUcnoNotBetween(String value1, String value2) {
            addCriterion("ucno not between", value1, value2, "ucno");
            return (Criteria) this;
        }

        public Criteria andCnoIsNull() {
            addCriterion("cno is null");
            return (Criteria) this;
        }

        public Criteria andCnoIsNotNull() {
            addCriterion("cno is not null");
            return (Criteria) this;
        }

        public Criteria andCnoEqualTo(String value) {
            addCriterion("cno =", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoNotEqualTo(String value) {
            addCriterion("cno <>", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoGreaterThan(String value) {
            addCriterion("cno >", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoGreaterThanOrEqualTo(String value) {
            addCriterion("cno >=", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoLessThan(String value) {
            addCriterion("cno <", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoLessThanOrEqualTo(String value) {
            addCriterion("cno <=", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoLike(String value) {
            addCriterion("cno like", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoNotLike(String value) {
            addCriterion("cno not like", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoIn(List<String> values) {
            addCriterion("cno in", values, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoNotIn(List<String> values) {
            addCriterion("cno not in", values, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoBetween(String value1, String value2) {
            addCriterion("cno between", value1, value2, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoNotBetween(String value1, String value2) {
            addCriterion("cno not between", value1, value2, "cno");
            return (Criteria) this;
        }

        public Criteria andUnoIsNull() {
            addCriterion("uno is null");
            return (Criteria) this;
        }

        public Criteria andUnoIsNotNull() {
            addCriterion("uno is not null");
            return (Criteria) this;
        }

        public Criteria andUnoEqualTo(String value) {
            addCriterion("uno =", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoNotEqualTo(String value) {
            addCriterion("uno <>", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoGreaterThan(String value) {
            addCriterion("uno >", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoGreaterThanOrEqualTo(String value) {
            addCriterion("uno >=", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoLessThan(String value) {
            addCriterion("uno <", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoLessThanOrEqualTo(String value) {
            addCriterion("uno <=", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoLike(String value) {
            addCriterion("uno like", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoNotLike(String value) {
            addCriterion("uno not like", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoIn(List<String> values) {
            addCriterion("uno in", values, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoNotIn(List<String> values) {
            addCriterion("uno not in", values, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoBetween(String value1, String value2) {
            addCriterion("uno between", value1, value2, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoNotBetween(String value1, String value2) {
            addCriterion("uno not between", value1, value2, "uno");
            return (Criteria) this;
        }

        public Criteria andUctimeIsNull() {
            addCriterion("ucTime is null");
            return (Criteria) this;
        }

        public Criteria andUctimeIsNotNull() {
            addCriterion("ucTime is not null");
            return (Criteria) this;
        }

        public Criteria andUctimeEqualTo(Date value) {
            addCriterionForJDBCTime("ucTime =", value, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeNotEqualTo(Date value) {
            addCriterionForJDBCTime("ucTime <>", value, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeGreaterThan(Date value) {
            addCriterionForJDBCTime("ucTime >", value, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("ucTime >=", value, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeLessThan(Date value) {
            addCriterionForJDBCTime("ucTime <", value, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("ucTime <=", value, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeIn(List<Date> values) {
            addCriterionForJDBCTime("ucTime in", values, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeNotIn(List<Date> values) {
            addCriterionForJDBCTime("ucTime not in", values, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("ucTime between", value1, value2, "uctime");
            return (Criteria) this;
        }

        public Criteria andUctimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("ucTime not between", value1, value2, "uctime");
            return (Criteria) this;
        }

        public Criteria andUcdateIsNull() {
            addCriterion("ucDate is null");
            return (Criteria) this;
        }

        public Criteria andUcdateIsNotNull() {
            addCriterion("ucDate is not null");
            return (Criteria) this;
        }

        public Criteria andUcdateEqualTo(Date value) {
            addCriterionForJDBCDate("ucDate =", value, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("ucDate <>", value, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateGreaterThan(Date value) {
            addCriterionForJDBCDate("ucDate >", value, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("ucDate >=", value, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateLessThan(Date value) {
            addCriterionForJDBCDate("ucDate <", value, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("ucDate <=", value, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateIn(List<Date> values) {
            addCriterionForJDBCDate("ucDate in", values, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateNotIn(List<Date> values) {
            addCriterionForJDBCDate("ucDate not in", values, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("ucDate between", value1, value2, "ucdate");
            return (Criteria) this;
        }

        public Criteria andUcdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("ucDate not between", value1, value2, "ucdate");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}